﻿using System.Data;
using System.Data.OleDb;

namespace SummerSmile.Common.Utils.Data.DBFactory
{
    internal class OleDBFactory : IDBFactory
    {
        public IDbConnection CreateConnection()
        {
            return new OleDbConnection();
        }

        public IDbCommand CreateCommand()
        {
            return new OleDbCommand();
        }

        public IDbDataAdapter CreateDataAdapter(IDbCommand cmd)
        {
            return new OleDbDataAdapter((OleDbCommand)cmd);
        }

        public string GetDateTimeString(string datetime)
        {
            return "#" + datetime + "#";
        }
    }
}
